<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/jpetstore.css" type="text/css">
</head>
<body>
    <!--头部引用-->
    <div th:replace="/common/IncludeTop::header"></div>

    <div id="BackLink">
        <a href="/catalog/viewMain">Return to Main Menu</a>
    </div>

    <div id="Catalog">

        <h2 th:text="${category.name}"></h2>

        <table>
            <tr>
                <th>Product ID</th>
                <th>Name</th>
            </tr>
            <tr th:each="product:${productList}">
                <td>
                    <a th:href="@{/catalog/viewProduct(productId=${product.productId})}" th:text="${product.productId}">产品id</a>
                </td>
                <td th:text="${product.name}"></td>
            </tr>

            <!--<c:forEach var="product" items="${sessionScope.productList}">
                <tr>
                    <td>
                        <a href="viewProduct?productId=${product.productId}">${product.productId}</a>
                    </td>
                    <td>${product.name}</td>
                </tr>
            </c:forEach>-->
        </table>

    </div>

    <!--底部引用-->
    <div th:replace="/common/IncludeBottom::footer"></div>

</body>
</html>